<?php
class Crb_Lang
{
    public static function current()
    {
        
        if (Zend_Registry::isRegistered('Lang'))
        {
            return Zend_Registry::get('Lang');    
        }
        else return false;
    }
    
    public static function set($lang)
    {
        Zend_Registry::set('Lang',$lang);
    }
    
    
    public static function getTranslator()
    {
        return Zend_Registry::get('translate');
    }
    
    public static function setTranslatorLocale($Locale)
    {
        Logger::logError($Locale);
        
        $translateObj = Zend_Registry::get('translate');
        $translateObj->setLocale($Locale);
    }
}